package com.atguigu.yygh.hosp.repository;

import com.atguigu.yygh.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {

    /**根据Hocode判断该数据是否存在，MongoRepository自动完成**/
    Hospital getHopitalByHoscode(String hoscode);

    /**根据医院编号获取源名称**/
    Hospital getHospitalByHoscode(String hoscode);

    /**根据医院名称获取**/
    List<Hospital> getHospitalByHosname(String hosname);
}
